package mr.ali.videoapp.portal.controller;


import com.github.pagehelper.PageInfo;
import mr.ali.videoapp.portal.model.CollectionCllect;
import mr.ali.videoapp.portal.model.CollectionPlayCllect;
import mr.ali.videoapp.portal.service.ICollectionPlayCllectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-07-20
 */
@RestController
@RequestMapping("/portal/collectionPlayCllect")
public class CollectionPlayCllectController {

    @Resource
    private ICollectionPlayCllectService collectionPlayCllectService;
    @GetMapping("/all")
    public PageInfo<CollectionPlayCllect> findAll(Integer pageNum , Integer pageSize ,Integer userId, Integer videoId){
        return collectionPlayCllectService.findAll(pageNum,pageSize,userId, videoId);
    }

    @GetMapping("/delete")
    public Integer delete(Integer userId, Integer urlId){
        return collectionPlayCllectService.delete(userId, urlId);
    }

    @GetMapping("/insert")
    public Integer insert(Integer userId, Integer videoId , Integer urlId , Integer Episode){
        return collectionPlayCllectService.insert(userId, videoId , urlId ,Episode);
    }
}
